package model

//后台管理员表

type Auth struct {
	BaseModel
	Account  string `form:"account" json:"account" gorm:"unique;type:varchar(100) not null;comment:登录账号"`
	Username string `form:"username" json:"username"  gorm:"type:varchar(100);comment:用户昵称"`
	Password string `form:"password" json:"password"  gorm:"type:varchar(255) not null;comment:密码 sha1加密"`
	Desc     string `form:"desc" json:"desc" gorm:"type:varchar(255);comment:描述"`
	Phone    string `form:"phone" json:"phone"  gorm:"unique;type:varchar(128) not null;comment:手机号"`
	Email    string `form:"email" json:"email" gorm:"unique;type:varchar(128) not null;comment:邮箱"`
	Avatar   string `form:"avatar" json:"avatar" gorm:"type:varchar(100) not null;comment:头像"`
	RoleId   uint   `form:"role_id" json:"role_id"  gorm:"not null;size:100; default:0;comment:角色表auth_role主键id"`
	LoginNum uint   `form:"login_num" json:"login_num" gorm:"size:10;default:0;comment:登录次数"`
	//LastLoginIp   string    `form:"last_login_ip" json:"last_login_ip" gorm:"type:varchar(20);comment:上次登录ip"`
	//LastLoginTime time.Time `form:"last_login_time" json:"last_login_time" gorm:"comment:上次登录时间"`
	//ThisLoginIp   string    `form:"this_login_ip" json:"this_login_ip" gorm:"type:varchar(20);comment:本次登录ip"`
	//ThisLoginTime time.Time `form:"this_login_time" json:"this_login_time" gorm:"comment:本次登录时间"`

	//CreditCard CreditCard `gorm:"foreignkey:UserName;references:name"
}
